package com.budwk.app.sqfw.controllers.admin;

import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.hutool.core.bean.BeanUtil;
import com.budwk.app.sqfw.models.RequestFailureLog;
import com.budwk.app.sqfw.models.SqfwNotice;
import com.budwk.app.sqfw.services.RequestFailureLogService;
import com.budwk.app.sys.models.Sys_user;
import com.budwk.starter.common.openapi.annotation.ApiDefinition;
import com.budwk.starter.common.result.Result;
import com.budwk.starter.security.utils.SecurityUtil;
import io.swagger.v3.oas.annotations.parameters.RequestBody;
import lombok.extern.slf4j.Slf4j;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.POST;
import org.nutz.mvc.annotation.Param;

import java.util.Date;


@IocBean
@At("platform/sqfw/requestFailureLog")
@ApiDefinition(tag = "请求失败日志")
@Slf4j
public class RequestFailureLogController {

    @Inject
    private RequestFailureLogService requestFailureLogService;
    @At
    @Ok("json")
    @POST
    public Result<?> addRequestFailureLog (@Param("..")RequestFailureLog requestFailureLog) {
        requestFailureLogService.insert(requestFailureLog);
        return Result.success();
    }

}
